import http from '@/units/require'
//获取商品列表请求
function productListRequest(page, per, name = '', category = '') {
  return http({
    url: '/api/v1/products',
    params: { page, per, name, category },
  })
}
//获取轮播列表
function LunboListRequest(){
  return http({
    url: '/api/v1/banners',
    params: { },
  })
}
//获取商品详情
function ProductDetailRequest(id){
  return http({
    url: '/api/v1/products/'+id,
    params: {},
  })
}
//获取商品分类列表
function ProductCateRequest(){
  return http({
    url: '/api/v1/product_categories',
    params: {},
  })
}
export {productListRequest,LunboListRequest,ProductDetailRequest,ProductCateRequest}
